var funnelOption = function (data,xName,yName,head,subhead){
	var xValue=[];
	var funnelData=[];
	var temp;
	for(var i=0;i<data.length;i++){
		xValue.push(data[i][xName]);
		temp={
				"name":data[i][xName],
				"value":data[i][yName]
		}
		funnelData.push(temp);
	}
	return  {
	    title : {
	        text: head,
	        subtext: subhead
	    },
	    tooltip : {
	        trigger: 'item',
	        formatter: "{a} <br/>{b} : {c}%"
	    },
	    toolbox: {
	        show : true,
	        feature : {
	            mark : {show: true},
	            dataView : {show: true, readOnly: false},
	            restore : {show: true},
	            saveAsImage : {show: true}
	        }
	    },
	    legend: {
	        data : xValue
	    },
	    calculable : true,
	    series : [
	        {
	            name:'漏斗图',
	            type:'funnel',
	            width: '50%',
	            x : '20%',
//	            sort : 'ascending',
	            itemStyle: {
	                normal: {
	                    // color: 各异,
	                    label: {
	                        position: 'right'
	                    }
	                }
	            },
	            data:funnelData
	        }
	    ]
	};
}